home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freelog 125
/
Freelog_MarsAvril2015_No125.iso
/
Musique
/
Quod Libet
/
quodlibet-3.3.0-installer.exe
/
bin
/
quodlibet
/
ext
/
events
/
autorating.pyc
(
.txt
)
< prev
next >
Wrap
Python Compiled Bytecode
|
2014-12-31
|
1KB
|
24 lines
# Source Generated with Decompyle++
# File: in.pyc (Python 2.7)
from quodlibet.plugins.events import EventPlugin
class AutoRating(EventPlugin):
PLUGIN_ID = 'Automatic Rating'
PLUGIN_NAME = _('Automatic Rating')
PLUGIN_VERSION = '0.22'
PLUGIN_DESC = _("Rate songs automatically when they are played or skipped. This uses the 'accelerated' algorithm from vux by Brian Nelson.")
def plugin_on_song_ended(self, song, skipped):
if song is not None:
rating = song('~#rating')
invrating = 1 - rating
delta = min(rating, invrating) / 2
if skipped:
rating -= delta
else:
rating += delta
song['~#rating'] = rating